home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Disc to the Future 2
/
Disc to the Future Part II Programmer's Reference (Wayzata Technology)(6013)(1992).bin
/
MAC
/
THINKC
/
4_0
/
SLIDEWIN.C
< prev
next >
Wrap
Text File
|
1989-06-12
|
1KB
|
38 lines
SlideWindow v1.0 Copyright 1989 by Josh Pritikin - Tetrahedron Programming.
This code may be used in any program only if there is a reference to Josh Pritikin
in the source code, as shown below.
SlideWindow(window, behind) /* thanx to Josh Pritikin */
WindowPeek window, behind;
{
RgnHandle clobberVis, structure;
Point gloff;
clobberVis = NewRgn(); structure = NewRgn();
CopyRgn(window->port.visRgn, clobberVis);
SendBehind(window, behind);
CalcVis(window);
DiffRgn(window->port.visRgn, clobberVis, clobberVis);
DiffRgn(window->strucRgn, window->contRgn, structure); /* already global */
SetPort(window);
gloff.h = 0; gloff.v = 0;
LocalToGlobal(&gloff);
OffsetRgn(clobberVis, gloff.h, gloff.v);
UnionRgn(clobberVis, structure, clobberVis);
PaintOne(window, clobberVis);
DisposeRgn(clobberVis); DisposeRgn(structure);
SetPort(behind);
}
I may be reached for pats on the back, suggestions, incompatiblities, death
threats, etc. at these fine BBS's:
GEnie: J.Pritikin Digital Dungeon (805) 969-9330: Razor